package com.easygem.common.model.system;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuwenze.poi.annotation.Excel;
import com.wuwenze.poi.annotation.ExcelField;
import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import java.sql.Timestamp;
import java.util.List;

/**
 * @author 罗力
 * @version 1.0
 * @className Employee
 * @description TODO 某某类
 * @date 2025/1/8 16:22
 */
@Data
@Excel("bg_employee")
@Table(name = "bg_employee")
public class Employee {
    @Id
    private Long empId;
    @ExcelField(value = "登录名", width = 50) //导出字段名
    private String empName;
    @ExcelField(value = "昵称", width = 50) //导出字段名
    private String nickName;
    private String password;

    @ExcelField(value = "邮箱", width = 150) //导出字段名
    private String email;

    @ExcelField(value = "电话", width = 150) //导出字段名
    private String phone;
    private String avatar;
    private Long deptId;
    @ExcelField(value = "创建时间", width = 150) //导出字段名
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp createTime;
    @ExcelField(value = "最后操作时间", width = 150) //导出字段名
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Timestamp editTime;

    @ExcelField(//
            value = "员工状态",
            readConverterExp = "正常=0,正常=1,冻结=-1",
            writeConverterExp = "0=正常,1=正常,-1=冻结"
            ,width = 80
    )
    private Integer status;
    private Integer isMove;
    private Integer isValidate;
    private String salt;
    private List<Long> ids;
    private Integer type;

    @TableField(exist = false)
    private transient String roleName;

    @TableField(exist = false)
    private transient String deptName;

}
